home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / standard / sqrt.z / sqrt
Text File  |  1998-10-30  |  6KB  |  133 lines

  1.  
  2.  
  3.  
  4. SSSSQQQQRRRRTTTT((((3333MMMM))))                                                              SSSSQQQQRRRRTTTT((((3333MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      sqrt, fsqrt, sqrtf, sqrtl, cbrt, cbrtl - cube root, square root
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<mmmmaaaatttthhhh....hhhh>>>>
  13.  
  14.      ddddoooouuuubbbblllleeee ssssqqqqrrrrtttt((((ddddoooouuuubbbblllleeee xxxx))));;;;
  15.      ffffllllooooaaaatttt ffffssssqqqqrrrrtttt((((ffffllllooooaaaatttt xxxx))));;;;
  16.      ffffllllooooaaaatttt ssssqqqqrrrrttttffff((((ffffllllooooaaaatttt xxxx))));;;;
  17.      lllloooonnnngggg ddddoooouuuubbbblllleeee ssssqqqqrrrrttttllll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx))));;;;
  18.  
  19.      ddddoooouuuubbbblllleeee ccccbbbbrrrrtttt((((ddddoooouuuubbbblllleeee xxxx))));;;;
  20.      lllloooonnnngggg ddddoooouuuubbbblllleeee ccccbbbbrrrrttttllll((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx))));;;;
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      The single-precision and long double-precision routines listed above are
  24.      only available in the standard math library, -_l_m, and in -_l_m_x.
  25.  
  26.      The _s_q_r_t functions return the nonnegative square root of their single
  27.      argument _x.  The function _s_q_r_t both accepts and returns values of type
  28.      double. The functions _f_s_q_r_t and _s_q_r_t_f accept and return float values.
  29.      The function _s_q_r_t_l both accepts and returns values of type long double.
  30.  
  31.      A fast version of _s_q_r_t and _f_s_q_r_t which are slightly less accurate are
  32.      available in the library -_l_f_a_s_t_m.  On mips2 and newer processors, those
  33.      routines are identical to the ones in libm.a, because there are hardware
  34.      square root instructions.
  35.  
  36.      The _c_b_r_t functions return the cube root of their single argument _x.  The
  37.      function _c_b_r_t both accepts and returns values of type double. The
  38.      function _c_b_r_t_l both accepts and returns values of type long double.
  39.  
  40. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  41.      In the diagnostics below, functions in the standard math library _l_i_b_m._a,
  42.      are referred to as -_l_m versions, those in math library _l_i_b_m_x._a are
  43.      referred to as -_l_m_x versions, and those in the the BSD math library
  44.      _l_i_b_m_4_3._a are referred to as -_l_m_4_3 versions.  The -_l_m and -_l_m_x versions
  45.      always return the default Quiet NaN and set _e_r_r_n_o to EDOM when a NaN is
  46.      used as an argument.  A NaN argument usually causes the -_l_m_4_3 versions to
  47.      return the same argument.  The -_l_m_4_3 versions never set _e_r_r_n_o.
  48.  
  49.      If _x is negative, the _s_q_r_t functions return a quiet NaN.  The -_l_m and
  50.      -_l_m_4_3 versions also set the flag in the floating-point coprocessor to
  51.      indicate an invalid operation. The functions in the standard math library
  52.      -_l_m and in library -_l_m_x also set _e_r_r_n_o to EDOM.
  53.  
  54.      See matherr(3M) for a description of error handling for -_l_m_x functions.
  55.  
  56. NNNNOOOOTTTTEEEESSSS
  57.      Long double operations on this system are only supported in round to
  58.      nearest rounding mode (the default).  The system must be in round to
  59.      nearest rounding mode when calling any of the long double functions, or
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSQQQQRRRRTTTT((((3333MMMM))))                                                              SSSSQQQQRRRRTTTT((((3333MMMM))))
  71.  
  72.  
  73.  
  74.      incorrect answers will result.
  75.  
  76.      Users concerned with portability to other computer systems should note
  77.      that the long double and float versions of these functions are optional
  78.      according to the ANSI C Programming Language Specification ISO/IEC 9899 :
  79.      1990 (E).
  80.  
  81.      Long double functions have been renamed to be compliant with the ANSI-C
  82.      standard, however to be backward compatible, they may still be called
  83.      with the double precision function name prefixed with a q.
  84.  
  85.      User's code which calls sqrt() or sqrtf() will be compiled into the
  86.      machine instruction sqrt.d or sqrt.s if the code #includes <math.h>.
  87.  
  88. EEEERRRRRRRROOOORRRR ((((dddduuuueeee ttttoooo RRRRoooouuuunnnnddddooooffffffff eeeettttcccc....))))
  89.      _c_b_r_t is accurate to within 0.7 _u_l_ps.
  90.  
  91.      lllliiiibbbbmmmm....aaaa _s_q_r_t conforms to IEEE 754 and is correctly rounded in accordance
  92.      with the rounding mode in force; the error is less than half an _u_l_p in
  93.      the default mode (round to nearest).
  94.  
  95.      The lllliiiibbbbffffaaaassssttttmmmm....aaaa _s_q_r_t and _f_s_q_r_t error is a maximum of one _u_l_p.  (See
  96.      however, the comments regarding -lfastm above.)
  97.  
  98.      An _u_l_p is one _Unit in the _Last _Place carried.
  99.  
  100. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  101.      math(3M), libmx(3M)
  102.  
  103. AAAAUUUUTTTTHHHHOOOORRRR
  104.      W. Kahan
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.